package com.xiaobao.service.impl;


import com.xiaobao.mapper.UserMapper;
import com.xiaobao.pojo.User;
import com.xiaobao.service.LoginService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


// 登录服务实现类
@Service
public class LoginServiceImpl implements LoginService {


    private final UserMapper userMapper;

    public LoginServiceImpl(UserMapper userMapper) {
        this.userMapper = userMapper;
    }

    // 获取所有用户
    @Override
    //@Transactional
    public User[] getAllUser() {
        // 调用userMapper中的getAllUser方法获取所有用户信息
        return userMapper.getAllUser();
    }
}
